package com.controller;

import com.service.PraiseService;
import com.util.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

@RequestMapping("/praise")
@Controller
public class PraiseCtl {

    @Autowired
    PraiseService praiseService;

    //点赞，李奇洲
    @ResponseBody
    @RequestMapping("/tgPraise.do")
    public AjaxResult tgPraise(@RequestParam("comment_id") Integer commentId, HttpSession httpSession){
        return praiseService.insertPraise(httpSession,commentId);
    }


}
